]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
windowManager: Limit super-scroll handling to normal mode
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 8 Mar 2021 18:59:23 +0000 (19:59 +0100)
committerMarge Bot <marge-bot@gnome.org>
Tue, 9 Mar 2021 12:28:36 +0000 (12:28 +0000)
The overview has it's own workspace scroll handling, and we don't want
to switch workspaces in other modes. Limiting the scroll-event handler
to NORMAL mode matches the swipe tracker used by WorkspaceAnimation,
and allows for other uses of scroll events (like scrolling in the
alt-tab popup).

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3840

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1746>

js/ui/windowManager.js

index 93777db22e2017beb5d039d63b10ea5c889e3d9f..34c54b61e11c3cc1677f59c12e0fe45c1d06e6df 100644 (file)
@@ -864,6 +864,10 @@ var WindowManager = class {
                            this._switchToApplication.bind(this));
 
         global.stage.connect('scroll-event', (stage, event) => {
+            const allowedModes = Shell.ActionMode.NORMAL;
+            if ((allowedModes & Main.actionMode) === 0)
+                return Clutter.EVENT_PROPAGATE;
+
             if (this._workspaceAnimation.canHandleScrollEvent(event))
                 return Clutter.EVENT_PROPAGATE;